{% extends "base.html" %}

{% block content %}
    <h1>文章列表</h1>
    <table border="0">
        <tr>
            <td>title</td>
            <td>content</td>
            <td>pub_time</td>
            <td>author</td>
            <td>operation</td>
        </tr>
        {% for article in article_list %}
            <tr>
                <td>{{ article.title }}</td>
                <td>{{ article.content }}</td>
                <td>{{ article.pub_time }}</td>
                <td>{{ article.author.name }}</td>
                <td>
                    <a href="/blog/detail?id={{ article.id }}">详情</a>
                    <a href="/blog/delete?id={{ article.id }}">删除</a>
                </td>
            </tr>
        {% endfor %}
    </table>
{% endblock %}